package com.mz.ieann.aide.city.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * <p>------------------------------------------------------
 * <p> Copyright (C) 2021 zhangmz, All rights reserved.
 * <p> If there is technical discussion, you can contact zhangmz90@foxmail.com
 * <p>------------------------------------------------------
 * <p> des
 * <p>
 *
 * @author Created by Administrator
 * @date on 2021 2021/10/27 21:19
 */
public class BaseResult<T> implements Parcelable {

    private String c;
    private T d;
    private String m;

    public BaseResult(){

    }

    protected BaseResult(Parcel in) {
        c = in.readString();
        m = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(c);
        dest.writeString(m);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<BaseResult> CREATOR = new Creator<BaseResult>() {
        @Override
        public BaseResult createFromParcel(Parcel in) {
            return new BaseResult(in);
        }

        @Override
        public BaseResult[] newArray(int size) {
            return new BaseResult[size];
        }
    };

    public String getC() {
        return c;
    }

    public void setC(String c) {
        this.c = c;
    }

    public T getD() {
        return d;
    }

    public void setD(T d) {
        this.d = d;
    }

    public String getM() {
        return m;
    }

    public void setM(String m) {
        this.m = m;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "c='" + c + '\'' +
                ", d=" + d.toString() +
                ", m='" + m + '\'' +
                '}';
    }
}
